Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order locations in ascii order #83

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

didrocks
Copy link
Contributor

@didrocks didrocks commented Jul 26, 2023

Before creating your Pull Request...

  • New Pull Requests should include a good description of what's being merged.
  • Ideally, all Pull Requests are preceded by a discussion initiated in an Issue on this repository.
  • For bug fixes is mandatory to have tests that cover and fail when the bug is present and will pass after this Pull Request.
  • For changes and improvements, new tests have to be provided to cover the new features.

Is this a fix, improvement or something else?

This is a fix.

Before we could get some different order on consecutive runs when running the pkgtree:

#: cmd/foo/client/version.go:27
#: cmd/foo/daemon/version.go:23
#: cmd/bar/commands/version.go:24
msgid "some string"
msgstr ""

But sometimes, the dependency order could become:

#: cmd/foo/daemon/version.go:23
#: cmd/foo/client/version.go:27
#: cmd/bar/commands/version.go:24
msgid "some string"
msgstr ""

What does this change implement/fix?

As in the pkg-tree implementation, the walking of different dependencies are not determinated, this means that we may have references swapping between consecutive runs. Ensure we always order them the same way now.

Unfortunately, there is no tests to cover that use case (also, the order is random, so it means we would need to run in a non trivial project with a lot of dependencies this tests and regenerate more than ten times). Also, this only impacts the pot file generation, so no code supposed to be running in production. I ensured there is no regression though.

I have ...

  • answered the 2 questions above,
  • discussed this change in an issue, -> Trivial change, I can open a bug if desired but that will be a repetition of this
  • included tests to cover this changes. -> See my comment on test above

As in the pkg-tree implementation, the walking of different dependencies
are not determinated, this means that we may have references swapping
between consecutive runs. Ensure we always order them the same way now.
@leonelquinteros leonelquinteros merged commit d32dc82 into leonelquinteros:master Aug 29, 2023
1 check passed
nono referenced this pull request in cozy/cozy-stack Apr 15, 2024
…4376)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/leonelquinteros/gotext](https://togithub.com/leonelquinteros/gotext)
| `v1.5.2` -> `v1.6.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fleonelquinteros%2fgotext/v1.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fleonelquinteros%2fgotext/v1.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fleonelquinteros%2fgotext/v1.5.2/v1.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fleonelquinteros%2fgotext/v1.5.2/v1.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>leonelquinteros/gotext
(github.com/leonelquinteros/gotext)</summary>

###
[`v1.6.0`](https://togithub.com/leonelquinteros/gotext/releases/tag/v1.6.0)

[Compare
Source](https://togithub.com/leonelquinteros/gotext/compare/v1.5.2...v1.6.0)

#### What's Changed

- Allow locale to use a `fs.FS` by
[@&#8203;kobergj](https://togithub.com/kobergj) in
[https://github.com/leonelquinteros/gotext/pull/68](https://togithub.com/leonelquinteros/gotext/pull/68)
- Runtime translation detection by
[@&#8203;m-horky](https://togithub.com/m-horky) in
[https://github.com/leonelquinteros/gotext/pull/69](https://togithub.com/leonelquinteros/gotext/pull/69)
- feat: Add language getter for Locale by
[@&#8203;taozhou-glean](https://togithub.com/taozhou-glean) in
[https://github.com/leonelquinteros/gotext/pull/77](https://togithub.com/leonelquinteros/gotext/pull/77)
- Allow setting global storage by
[@&#8203;didrocks](https://togithub.com/didrocks) in
[https://github.com/leonelquinteros/gotext/pull/80](https://togithub.com/leonelquinteros/gotext/pull/80)
- Fix multiline export by
[@&#8203;didrocks](https://togithub.com/didrocks) in
[https://github.com/leonelquinteros/gotext/pull/82](https://togithub.com/leonelquinteros/gotext/pull/82)
- Order locations in ascii order by
[@&#8203;didrocks](https://togithub.com/didrocks) in
[https://github.com/leonelquinteros/gotext/pull/83](https://togithub.com/leonelquinteros/gotext/pull/83)
- Fix io/fs File leak by
[@&#8203;diamondburned](https://togithub.com/diamondburned) in
[https://github.com/leonelquinteros/gotext/pull/79](https://togithub.com/leonelquinteros/gotext/pull/79)
- Add support for multiple languages by
[@&#8203;m-horky](https://togithub.com/m-horky) in
[https://github.com/leonelquinteros/gotext/pull/73](https://togithub.com/leonelquinteros/gotext/pull/73)
- Revert "Add support for multiple languages" by
[@&#8203;leonelquinteros](https://togithub.com/leonelquinteros) in
[https://github.com/leonelquinteros/gotext/pull/84](https://togithub.com/leonelquinteros/gotext/pull/84)
- Remove unused dependency by
[@&#8203;der-lyse](https://togithub.com/der-lyse) in
[https://github.com/leonelquinteros/gotext/pull/86](https://togithub.com/leonelquinteros/gotext/pull/86)
- Fix typo in documentation by
[@&#8203;der-lyse](https://togithub.com/der-lyse) in
[https://github.com/leonelquinteros/gotext/pull/87](https://togithub.com/leonelquinteros/gotext/pull/87)
- Add support for multiple languages by
[@&#8203;m-horky](https://togithub.com/m-horky) in
[https://github.com/leonelquinteros/gotext/pull/85](https://togithub.com/leonelquinteros/gotext/pull/85)

#### New Contributors

- [@&#8203;kobergj](https://togithub.com/kobergj) made their first
contribution in
[https://github.com/leonelquinteros/gotext/pull/68](https://togithub.com/leonelquinteros/gotext/pull/68)
- [@&#8203;m-horky](https://togithub.com/m-horky) made their first
contribution in
[https://github.com/leonelquinteros/gotext/pull/69](https://togithub.com/leonelquinteros/gotext/pull/69)
- [@&#8203;taozhou-glean](https://togithub.com/taozhou-glean) made their
first contribution in
[https://github.com/leonelquinteros/gotext/pull/77](https://togithub.com/leonelquinteros/gotext/pull/77)
- [@&#8203;didrocks](https://togithub.com/didrocks) made their first
contribution in
[https://github.com/leonelquinteros/gotext/pull/80](https://togithub.com/leonelquinteros/gotext/pull/80)
- [@&#8203;diamondburned](https://togithub.com/diamondburned) made their
first contribution in
[https://github.com/leonelquinteros/gotext/pull/79](https://togithub.com/leonelquinteros/gotext/pull/79)
- [@&#8203;der-lyse](https://togithub.com/der-lyse) made their first
contribution in
[https://github.com/leonelquinteros/gotext/pull/86](https://togithub.com/leonelquinteros/gotext/pull/86)

**Full Changelog**:
leonelquinteros/gotext@v1.5.2...v1.6.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 6am on Monday" in timezone
Europe/Paris, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/cozy/cozy-stack).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants